<template>
  <ElConfigProvider
    namespace="el"
    :locale="currentLocale.elLocale"
    :message="{ max: 1 }"
    :size="size"
  >
    <slot></slot>
  </ElConfigProvider>
</template>
<script setup lang="ts">
import { computed } from 'vue';
import { propTypes } from '@/utils/propTypes';
import { type ComponentSize } from 'element-plus';
import { useLocaleStore } from '@/stores/modules/locale';
defineProps({
  size: propTypes.oneOf<ComponentSize>(['default', 'small', 'large']).def('default')
});
// 多语言相关
const localeStore = useLocaleStore();
const currentLocale = computed(() => localeStore.getCurrentLocale);
</script>
